package com.song.config;

import com.song.servlet.Myservlet;
import org.springframework.boot.web.servlet.ServletRegistrationBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @ClassName : MyConfig
 * @Author : 司猫子
 * @Date: 2021/3/1 12:58
 */
@Configuration
public class MyConfig {

    @Bean
    public ServletRegistrationBean servletRegistrationBean(){
        Myservlet myservlet = new Myservlet();
        ServletRegistrationBean bean = new ServletRegistrationBean(myservlet,"/myservlet");
        return bean;
    }
}
